package org.anjan.dp.observer;

/**
 * Created by chebbaso on 12/4/14.
 */
public class WeatherData {

    private float temperature;
    private float humidity;
    private float pressure;

    public void measurementsChanged() {
        float temperature = getTemperature();
        float humidity = getHumidity();
        float pressure = getPressure();
        //issue is that we are coding to the concrete implementations.
        //all of them have a common interface
        //cant add a new display
        //encapsulation of the Weather data class is broken.
//        currentConditionDisplay.update(temperature, humidity, pressure);
//        statisticsDisplay.update(temperature, humidity, pressure);
//        forecastDisplay.update(temperature, humidity, pressure);
    }

    public float getTemperature() {
        return temperature;
    }

    public float getHumidity() {
        return humidity;
    }

    public float getPressure() {
        return pressure;
    }
}
